<?php
//Nơi khai báo các components được sử dụng trong hệ thống.
return array(
	'user'=>array(
		'class'=>'RWebUser',
		// enable cookie-based authentication
		'allowAutoLogin'=>true,
		'loginUrl'=>array('/user/login'),
	),
	// uncomment the following to enable URLs in path-format
	
	'urlManager'=>array(
		'urlFormat'=>'path',
		'showScriptName'=>false,
		'rules'=>require(dirname(__FILE__) . '/_routers.php'),
	),
/*
	'db'=>array(
		'connectionString' => 'sqlite:'.dirname(__FILE__).'/../data/testdrive.db',
	),
*/
	'db'=>array(
		'connectionString' => 'mysql:host=localhost;dbname=cardonline',
		'emulatePrepare' => true,
		'username' => 'root',
		'password' => '',
		'charset' => 'utf8',
	),
	
	'errorHandler'=>array(
		// use 'site/error' action to display errors
		'errorAction'=>'home/error',
	),
	'log'=>array(
		'class'=>'CLogRouter',
		'routes'=>array(
			array(
				'class'=>'CFileLogRoute',
				'levels'=>'error, warning',
			),
			// uncomment the following to show log messages on web pages
			/*
			array(
				'class'=>'CWebLogRoute',
			),
			*/
		),
	),
	
	'bootstrap' => array(
		'class' => 'ext.bootstrap.components.Bootstrap',
		'responsiveCss' => true,
	),
	'dynamicRes'=>array(
		'class' => 'application.extensions.DynamicRes.DynamicRes',
		'urlConfig' => array( // Its fix Css, and convert Url to RealName 
		'baseUrl'  => '/',
		'basePath' => dirname(__FILE__).'/../../', // path of your site (ending with /) (No Change This)
		'debug'=>true
		)
	),
	'authManager'=>array(
		'class'=>'RDbAuthManager',
		'connectionID'=>'db',
		'defaultRoles'=>array('Authenticated', 'Guest'),
		'assignmentTable'=>'authassignment',
		'itemTable'=>'authitem',
		'rightsTable'=>'rights'
	),
);
/* End file _components.php */
/* Location: aplication.protected.config._components */